import { defineStore } from 'pinia'
import { shallowRef } from 'vue'

export const useStore = defineStore('main', () => {
  const token = shallowRef('')

  const setToken = () => {
    token.value = 'xxxx'
  }

  return {
    token,
    setToken
  }
}, {
  persist: {
    storage: localStorage,
    pick: ['token'],
  },
})